package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.wing.mybatis.common.BaseEntity;
import lombok.*;
import lombok.experimental.Accessors;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 产品类型
 *
 * @author
 */
@EqualsAndHashCode(callSuper = true)
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("pro_outsourcing_order")
public class ProOutsourcingOrder extends BaseEntity<ProOutsourcingOrder> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单编号用
     */
    private Integer day;

    /**
     * 订单编号
     */
    private String code;

    /**
     * 订单编号用
     */
    private Integer no;

    /**
     * 部门
     */
    private Long departmentId;

    /**
     * 预计结束时间
     */
    private LocalDateTime endTime;

    /**
     * 预计开始时间
     */
    private LocalDateTime startTime;

    /**
     * 是否去料加工 1.是 2.否
     */
    private Boolean isOutSku;

    /**
     * 1. 待提交 2.待审核 3.待签收 4. 完成
     */
    private String status;

    /**
     * 供应商id
     */
    private Long supplierId;

    @TableField(exist = false)
    private String supplierName;

    /**
     * 业务类型 1.整体委外 2.工序委外
     */
    private String type;


    /**
     * 产品总数
     */
    @TableField(exist = false)
    private Integer productCount;

    /**
     * 订单总金额
     */
    @TableField(exist = false)
    private BigDecimal totalPrice;

    /**
     * sku数量
     */
    @TableField(exist = false)
    private Integer skuCount;

}
